<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Nabu-asr: input_pipeline.py File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Nabu-asr
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_5a19dd24bd3679bb79d0ed8fbf6eb6c5.html">nabu</a></li><li class="navelem"><a class="el" href="dir_38a0e828cfd915bf1a57174729a2f8cd.html">processing</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">input_pipeline.py File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>contains the methotology for creating the input pipeline  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad9c5835552b79cc7e7a38853a753a862"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="input__pipeline_8py.html#ad9c5835552b79cc7e7a38853a753a862">nabu.processing.input_pipeline.get_filenames</a> (dataconfs)</td></tr>
<tr class="memdesc:ad9c5835552b79cc7e7a38853a753a862"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a list of filenames to put into the queue  <a href="input__pipeline_8py.html#ad9c5835552b79cc7e7a38853a753a862">More...</a><br /></td></tr>
<tr class="separator:ad9c5835552b79cc7e7a38853a753a862"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c06d205001055093670c3910e930699"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="input__pipeline_8py.html#a9c06d205001055093670c3910e930699">nabu.processing.input_pipeline.input_pipeline</a> (data_queue, batch_size, numbuckets, dataconfs, variable_batch_size=False, allow_smaller_final_batch=False, name=None)</td></tr>
<tr class="memdesc:a9c06d205001055093670c3910e930699"><td class="mdescLeft">&#160;</td><td class="mdescRight">create the input pipeline  <a href="input__pipeline_8py.html#a9c06d205001055093670c3910e930699">More...</a><br /></td></tr>
<tr class="separator:a9c06d205001055093670c3910e930699"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03ae35500d261c7e05f274e85ccec0ef"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="input__pipeline_8py.html#a03ae35500d261c7e05f274e85ccec0ef">nabu.processing.input_pipeline.bucket_boundaries</a> (histogram, numbuckets)</td></tr>
<tr class="memdesc:a03ae35500d261c7e05f274e85ccec0ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">detemine the bucket boundaries to uniformally devide the number of elements in the buckets  <a href="input__pipeline_8py.html#a03ae35500d261c7e05f274e85ccec0ef">More...</a><br /></td></tr>
<tr class="separator:a03ae35500d261c7e05f274e85ccec0ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>contains the methotology for creating the input pipeline </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="file_a03ae35500d261c7e05f274e85ccec0ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a03ae35500d261c7e05f274e85ccec0ef">&sect;&nbsp;</a></span>bucket_boundaries()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.processing.input_pipeline.bucket_boundaries </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>histogram</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>numbuckets</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>detemine the bucket boundaries to uniformally devide the number of elements in the buckets </p>
<p>this is a greedy algorithm and does not guarantee an optimal solution </p>

</div>
</div>
<a id="file_ad9c5835552b79cc7e7a38853a753a862"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_ad9c5835552b79cc7e7a38853a753a862">&sect;&nbsp;</a></span>get_filenames()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.processing.input_pipeline.get_filenames </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>dataconfs</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>create a list of filenames to put into the queue </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataconfs</td><td>the database configurations as a list of lists</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>a list containing all the filenames</li>
<li>a list containing the names </li>
</ul>
</dd></dl>

</div>
</div>
<a id="file_a9c06d205001055093670c3910e930699"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a9c06d205001055093670c3910e930699">&sect;&nbsp;</a></span>input_pipeline()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def nabu.processing.input_pipeline.input_pipeline </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>data_queue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>batch_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>numbuckets</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>dataconfs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>variable_batch_size</em> = <code>False</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>allow_smaller_final_batch</em> = <code>False</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>name</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>create the input pipeline </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data_queue</td><td>the data queue where the filenemas are queued </td></tr>
    <tr><td class="paramname">batch_size</td><td>the desired batch size </td></tr>
    <tr><td class="paramname">numbuckets</td><td>the number of data buckets </td></tr>
    <tr><td class="paramname">dataconfs</td><td>the databes configuration sections that should be read as a list of lists </td></tr>
    <tr><td class="paramname">variable_batch_size</td><td>bool, change batch size from bucket to bucket, for buckets with higher seq_length a smaller batch size is used </td></tr>
    <tr><td class="paramname">allow_smaller_final_batch</td><td>if set to True a smaller final batch is </td></tr>
    <tr><td class="paramname">allowed</td><td></td></tr>
    <tr><td class="paramname">name</td><td>name of the pipeline</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>the data elements as a list of [batch_size x ...] tensor</li>
<li>the sequence lengths as a list of [batch_size] tensor</li>
<li>the number of steps in each epoch</li>
<li>the maximal length a sequence can be </li>
</ul>
</dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>
